<html xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui" >

    <ui:composition template="layout.xhtml">

        <ui:define name="corpo">
            <h:form id="criarCor" acceptcharset="utf-8"> 
                <div id="breadcrumb">
                    <p:commandLink  actionListener="#{managerIndex.redirect('index.xhtml')}" value="Inicio" update="@form" immediate="true"/> >
                    <p:commandLink  actionListener="#{managerIndex.redirect('config.xhtml')}" value="Configurações" update="@form" immediate="true"/> >
                    <p:commandLink  actionListener="#{managerIndex.redirect('indexCorSelo.xhtml')}" value="Cor do Selo" update="@form" immediate="true"/> >
                    <p:commandLink  value="Cadastrar Cor" update="@form" immediate="true"/>
                </div>
                <p:panel header="Cadastrar Cor Selo">
                    <p:messages id="msg"/>
                    <fieldset>
                        <legend>Dados Cor do Selo</legend> 
                        <h:panelGrid columns="2"  border="0" styleClass="textAlignRight" columnClasses="textAlignRight"> 
                            <h:outputLabel value="Descrição: "/>
                            <p:inputText value="#{managerCorSelo.corSelo.descricao}"
                                         id="nome_tiposelo"
                                         required="true" size="50" 
                                         requiredMessage="O campo nome deve ser preenchido "/>
                            
                            <h:outputLabel value="Cor: "/>
                            <p:colorPicker id="popupCP" value="#{managerCorSelo.corSelo.cor}" widgetVar="picker"/>
                            
                        </h:panelGrid>
                    </fieldset> 
                        
                    <div class="buttonAction">
                        <p:commandButton id="id_submit"  icon="ui-icon-disk" value="Salvar" actionListener="#{managerCorSelo.salvar()}" update="@form" />
                        <p:commandButton value="Cancelar" icon="ui-icon-arrowreturnthick-1-w" actionListener="#{managerCorSelo.redirect('indexCorSelo.xhtml')}" immediate="true"/>
                    </div>
                    
                </p:panel>   
                <p:ajaxStatus style="width:16px;height:16px;" id="ajaxStatusPanel">  
                                <f:facet name="start">  
                                    <h:graphicImage value="/media/img/loading.gif" />  
                                </f:facet>  

                                <f:facet name="complete">  
                                    <h:outputText value="" />  
                                </f:facet>  
                            </p:ajaxStatus>
                </h:form>
        </ui:define>
    </ui:composition> 

</html>